<style>
    table tbody tr:hover {
        background-color: #efefef;
    }
</style>
<section class="content" >
    <div class="row"   >
        <div class="col-xs-12">
            <div class="box">
                <div class="box-body"  >
                    <table class="table">
                        <thead>
                        <tr>
                            <th width="15%">操作</th>
                            <th width="10%">虚拟机名称</th>
                            <th width="10%">虚拟机IP</th>
                            <th width="10%">使用者</th>
                            <th width="15%">创建日期</th>
                            <th width="15%">归还日期</th>
                            <th width="25%">描述</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                        <tr class="item" data-ng-repeat="vm in info.ucList">
                            <td>
                                <i class="glyphicon glyphicon-play-circle i_class" data-ng-click="goRelease(vm);" uib-popover="部署" popover-trigger="mouseenter"/>
                                <i class="glyphicon glyphicon-cog i_class" data-ng-click="goInit(vm);" uib-popover="初始化" popover-trigger="mouseenter"/>
                                <i class="glyphicon glyphicon-tasks i_class" data-ng-click="goProgress(vm);" uib-popover="初始化进度" popover-trigger="mouseenter"/>
                                <i class="glyphicon glyphicon-pencil i_class" ng-show="!vm.modifiable" data-ng-click="editVm(vm);" uib-popover="编辑虚拟机信息" popover-trigger="mouseenter"/>
                                <i class="glyphicon glyphicon-floppy-saved i_class" ng-show="vm.modifiable" data-ng-click="editVm(vm);" uib-popover="保存虚拟机信息" popover-trigger="mouseenter"/>

                                <!--检查dump文件-->
                                <i class="glyphicon glyphicon-check i_class" data-ng-click="checkDump(vm);" ng-if="arrayContains(info.userRole , 'admin') && !vm.isRunning" uib-popover="检查数据库文件是否正常" popover-trigger="mouseenter"/>
                                <i class="glyphicon glyphicon-check i_class" ng-if="arrayContains(info.userRole , 'admin') && vm.isRunning" uib-popover="检查数据库文件是否正常" popover-trigger="mouseenter" style="color: grey;"/>
                                <!--刷新dump文件更新时间-->
                                <i class="glyphicon glyphicon-refresh i_class" data-ng-click="updateDumpTime(vm);" ng-if="arrayContains(info.userRole , 'admin') && !vm.isRunning" uib-popover="刷新数据库文件更新时间" popover-trigger="mouseenter"/>
                                <i class="glyphicon glyphicon-refresh i_class" ng-if="arrayContains(info.userRole , 'admin') && vm.isRunning" uib-popover="刷新数据库文件更新时间" popover-trigger="mouseenter" style="color: grey;"/>
                            </td>
                            <td>{{vm.name}}</td>
                            <td>{{vm.ip}}</td>
                            <td>
                                <input style="width: 80%;" ng-show="vm.modifiable" type="text" class="form-control" data-ng-model="vm.user">
                                <span ng-show="!(vm.modifiable)">{{vm.user}}</span>
                            </td>
                            <td>
                                <p ng-show="vm.modifiable" class="input-group">
                                    <input clear-text="清除" close-text="关闭" current-text="今天" ng-readonly="true"
                                           type="text" class="form-control" uib-datepicker-popup ng-model="vm.createDate"
                                           is-open="vm.createDateOpened"  ng-required="true" close-text="Close" />
                                    <span class="input-group-btn">
                                <button type="button" class="btn btn-default" ng-click="vm.createDateOpened=!vm.createDateOpened"><i class="glyphicon glyphicon-calendar"></i></button>
                            </span>
                                </p>
                                <span ng-show="!vm.modifiable">{{vm.createDate| date:'yyyy-MM-dd'}}</span>
                            </td>
                            <td>
                                <p ng-show="vm.modifiable" class="input-group">
                                    <input clear-text="清除" close-text="关闭" current-text="今天" ng-readonly="true"
                                           type="text" class="form-control" uib-datepicker-popup ng-model="vm.returnDate"
                                           is-open="vm.returnDateOpened"  ng-required="true" close-text="Close" />
                                    <span class="input-group-btn">
                                <button type="button" class="btn btn-default" ng-click="vm.returnDateOpened=!vm.returnDateOpened"><i class="glyphicon glyphicon-calendar"></i></button>
                            </span>
                                </p>
                                <span ng-show="!vm.modifiable">{{vm.returnDate| date:'yyyy-MM-dd'}}</span>
                            </td>
                            <td>
                                <input style="width: 80%;" ng-show="vm.modifiable" type="text" class="form-control" data-ng-model="vm.desc">
                                <span ng-show="!(vm.modifiable)">{{vm.desc}}</span>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</section>